package holo.Utils;

import com.alibaba.druid.pool.DruidDataSourceFactory;
import com.alibaba.fastjson.JSONObject;
import util.YtJSONObject;

import javax.sql.DataSource;
import java.sql.*;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

/**
 * @author Malegod_xiaofei
 * @create 2022-06-10-11:55
 */
public class Update_Holo_2022 {
    //定义SQL 链接 预编译器
    private static DataSource dataSource = null;
    private static Connection connection = null;
    private static PreparedStatement preparedStatement = null;

    public static void main(String[] args) throws Exception {
        String[] month = {"202208"};
//        String[] month = {"202201", "202202", "202203", "202204", "202205", "202206", "202207", "202208"};
        Map<String, JSONObject> check_region_id = new HashMap<>();
        check_region_id.put("120200", new YtJSONObject().put("new_region_id", "120100").put("province", "天津市").put("city", "天津市").put("district", "").getHome());
        check_region_id.put("120225", new YtJSONObject().put("new_region_id", "120119").put("province", "天津市").put("city", "天津市").put("district", "蓟州区").getHome());
        check_region_id.put("130103", new YtJSONObject().put("new_region_id", "130502").put("province", "河北省").put("city", "邢台市").put("district", "襄都区").getHome());
        check_region_id.put("130223", new YtJSONObject().put("new_region_id", "130284").put("province", "河北省").put("city", "唐山市").put("district", "滦州市").getHome());
        check_region_id.put("130428", new YtJSONObject().put("new_region_id", "130407").put("province", "河北省").put("city", "邯郸市").put("district", "肥乡县").getHome());
        check_region_id.put("130429", new YtJSONObject().put("new_region_id", "130408").put("province", "河北省").put("city", "邯郸市").put("district", "永年区").getHome());
        check_region_id.put("130521", new YtJSONObject().put("new_region_id", "130502").put("province", "河北省").put("city", "邢台市").put("district", "襄都区").getHome());
        check_region_id.put("130526", new YtJSONObject().put("new_region_id", "130505").put("province", "河北省").put("city", "邢台市").put("district", "任泽区").getHome());
        check_region_id.put("130527", new YtJSONObject().put("new_region_id", "130506").put("province", "河北省").put("city", "邢台市").put("district", "南和区").getHome());
        check_region_id.put("130629", new YtJSONObject().put("new_region_id", "139003").put("province", "河北省").put("city", "省直辖县级行政区划").put("district", "雄安新区").getHome());
        check_region_id.put("130632", new YtJSONObject().put("new_region_id", "139003").put("province", "河北省").put("city", "省直辖县级行政区划").put("district", "雄安新区").getHome());
        check_region_id.put("130638", new YtJSONObject().put("new_region_id", "139003").put("province", "河北省").put("city", "省直辖县级行政区划").put("district", "雄安新区").getHome());
        check_region_id.put("130682", new YtJSONObject().put("new_region_id", "139003").put("province", "河北省").put("city", "省直辖县级行政区划").put("district", "定州市").getHome());
        check_region_id.put("130721", new YtJSONObject().put("new_region_id", "130705").put("province", "河北省").put("city", "张家口市").put("district", "宣化区").getHome());
        check_region_id.put("130729", new YtJSONObject().put("new_region_id", "130708").put("province", "河北省").put("city", "张家口市").put("district", "万全区").getHome());
        check_region_id.put("130733", new YtJSONObject().put("new_region_id", "130709").put("province", "河北省").put("city", "张家口市").put("district", "崇礼区").getHome());
        check_region_id.put("130823", new YtJSONObject().put("new_region_id", "130881").put("province", "河北省").put("city", "承德市").put("district", "平泉县").getHome());
        check_region_id.put("140202", new YtJSONObject().put("new_region_id", "140213").put("province", "山西省").put("city", "大同市").put("district", "平城区").getHome());
        check_region_id.put("140203", new YtJSONObject().put("new_region_id", "140214").put("province", "山西省").put("city", "大同市").put("district", "矿区").getHome());
        check_region_id.put("140211", new YtJSONObject().put("new_region_id", "140213").put("province", "山西省").put("city", "大同市").put("district", "平城区").getHome());
        check_region_id.put("140227", new YtJSONObject().put("new_region_id", "140215").put("province", "山西省").put("city", "大同市").put("district", "大同县").getHome());
        check_region_id.put("140402", new YtJSONObject().put("new_region_id", "140403").put("province", "山西省").put("city", "长治市").put("district", "潞州区").getHome());
        check_region_id.put("140411", new YtJSONObject().put("new_region_id", "140403").put("province", "山西省").put("city", "长治市").put("district", "潞州区").getHome());
        check_region_id.put("140421", new YtJSONObject().put("new_region_id", "140404").put("province", "山西省").put("city", "长治市").put("district", "上党区").getHome());
        check_region_id.put("140424", new YtJSONObject().put("new_region_id", "140405").put("province", "山西省").put("city", "长治市").put("district", "屯留区").getHome());
        check_region_id.put("140481", new YtJSONObject().put("new_region_id", "140406").put("province", "山西省").put("city", "长治市").put("district", "潞城市").getHome());
        check_region_id.put("140624", new YtJSONObject().put("new_region_id", "140681").put("province", "山西省").put("city", "朔州市").put("district", "怀仁市").getHome());
        check_region_id.put("140726", new YtJSONObject().put("new_region_id", "140703").put("province", "山西省").put("city", "晋中市").put("district", "太谷区").getHome());
        check_region_id.put("210122", new YtJSONObject().put("new_region_id", "210115").put("province", "辽宁省").put("city", "沈阳市").put("district", "辽中区").getHome());
        check_region_id.put("211121", new YtJSONObject().put("new_region_id", "211104").put("province", "辽宁省").put("city", "盘锦市").put("district", "大洼区").getHome());
        check_region_id.put("220381", new YtJSONObject().put("new_region_id", "220184").put("province", "吉林省").put("city", "省直辖县级行政区划").put("district", "公主岭市").getHome());
        check_region_id.put("230702", new YtJSONObject().put("new_region_id", "230717").put("province", "黑龙江省").put("city", "伊春市").put("district", "伊美区").getHome());
        check_region_id.put("230703", new YtJSONObject().put("new_region_id", "230726").put("province", "黑龙江省").put("city", "伊春市").put("district", "南岔县").getHome());
        check_region_id.put("230704", new YtJSONObject().put("new_region_id", "230719").put("province", "黑龙江省").put("city", "伊春市").put("district", "友好区").getHome());
        check_region_id.put("230705", new YtJSONObject().put("new_region_id", "230751").put("province", "黑龙江省").put("city", "伊春市").put("district", "金林区").getHome());
        check_region_id.put("230706", new YtJSONObject().put("new_region_id", "230718").put("province", "黑龙江省").put("city", "伊春市").put("district", "乌翠区").getHome());
        check_region_id.put("230707", new YtJSONObject().put("new_region_id", "230724").put("province", "黑龙江省").put("city", "伊春市").put("district", "丰林县").getHome());
        check_region_id.put("230708", new YtJSONObject().put("new_region_id", "230717").put("province", "黑龙江省").put("city", "伊春市").put("district", "伊美区").getHome());
        check_region_id.put("230709", new YtJSONObject().put("new_region_id", "230751").put("province", "黑龙江省").put("city", "伊春市").put("district", "金林区").getHome());
        check_region_id.put("230710", new YtJSONObject().put("new_region_id", "230724").put("province", "黑龙江省").put("city", "伊春市").put("district", "丰林县").getHome());
        check_region_id.put("230711", new YtJSONObject().put("new_region_id", "230717").put("province", "黑龙江省").put("city", "伊春市").put("district", "伊美区").getHome());
        check_region_id.put("230712", new YtJSONObject().put("new_region_id", "230723").put("province", "黑龙江省").put("city", "伊春市").put("district", "汤旺县").getHome());
        check_region_id.put("230715", new YtJSONObject().put("new_region_id", "230724").put("province", "黑龙江省").put("city", "伊春市").put("district", "丰林县").getHome());
        check_region_id.put("231024", new YtJSONObject().put("new_region_id", "231086").put("province", "黑龙江省").put("city", "牡丹江市").put("district", "东宁市").getHome());
        check_region_id.put("231121", new YtJSONObject().put("new_region_id", "231183").put("province", "黑龙江省").put("city", "黑河市").put("district", "嫩江市").getHome());
        check_region_id.put("232718", new YtJSONObject().put("new_region_id", "232701").put("province", "黑龙江省").put("city", "大兴安岭地区").put("district", "漠河市").getHome());
        check_region_id.put("232723", new YtJSONObject().put("new_region_id", "232701").put("province", "黑龙江省").put("city", "大兴安岭地区").put("district", "漠河市").getHome());
        check_region_id.put("310230", new YtJSONObject().put("new_region_id", "310151").put("province", "上海市").put("city", "上海市").put("district", "崇明区").getHome());
        check_region_id.put("320103", new YtJSONObject().put("new_region_id", "320104").put("province", "江苏省").put("city", "南京市").put("district", "秦淮区").getHome());
        check_region_id.put("320504", new YtJSONObject().put("new_region_id", "320508").put("province", "江苏省").put("city", "苏州市").put("district", "姑苏区").getHome());
        check_region_id.put("320602", new YtJSONObject().put("new_region_id", "320613").put("province", "江苏省").put("city", "南通市").put("district", "崇川区").getHome());
        check_region_id.put("320621", new YtJSONObject().put("new_region_id", "320685").put("province", "江苏省").put("city", "南通市").put("district", "海安县").getHome());
        check_region_id.put("320684", new YtJSONObject().put("new_region_id", "320614").put("province", "江苏省").put("city", "南通市").put("district", "海门区").getHome());
        check_region_id.put("320705", new YtJSONObject().put("new_region_id", "320706").put("province", "江苏省").put("city", "连云港市").put("district", "海州区").getHome());
        check_region_id.put("320811", new YtJSONObject().put("new_region_id", "320812").put("province", "江苏省").put("city", "淮安市").put("district", "清江浦区").getHome());
        check_region_id.put("320829", new YtJSONObject().put("new_region_id", "320813").put("province", "江苏省").put("city", "淮安市").put("district", "洪泽区").getHome());
        check_region_id.put("330185", new YtJSONObject().put("new_region_id", "330112").put("province", "浙江省").put("city", "杭州市").put("district", "临安市").getHome());
        check_region_id.put("330283", new YtJSONObject().put("new_region_id", "330213").put("province", "浙江省").put("city", "宁波市").put("district", "奉化市").getHome());
        check_region_id.put("331021", new YtJSONObject().put("new_region_id", "331083").put("province", "浙江省").put("city", "台州市").put("district", "玉环市").getHome());
        check_region_id.put("340203", new YtJSONObject().put("new_region_id", "340209").put("province", "安徽省").put("city", "芜湖市").put("district", "弋江区").getHome());
        check_region_id.put("340212", new YtJSONObject().put("new_region_id", "340211").put("province", "安徽省").put("city", "芜湖市").put("district", "繁昌区").getHome());
        check_region_id.put("340221", new YtJSONObject().put("new_region_id", "340210").put("province", "安徽省").put("city", "芜湖市").put("district", "湾沚区").getHome());
        check_region_id.put("340222", new YtJSONObject().put("new_region_id", "340211").put("province", "安徽省").put("city", "芜湖市").put("district", "繁昌区").getHome());
        check_region_id.put("340225", new YtJSONObject().put("new_region_id", "340281").put("province", "安徽省").put("city", "芜湖市").put("district", "无为市").getHome());
        check_region_id.put("340824", new YtJSONObject().put("new_region_id", "340882").put("province", "安徽省").put("city", "安庆市").put("district", "潜山市").getHome());
        check_region_id.put("341822", new YtJSONObject().put("new_region_id", "341882").put("province", "安徽省").put("city", "宣城市").put("district", "广德市").getHome());
        check_region_id.put("350182", new YtJSONObject().put("new_region_id", "350112").put("province", "福建省").put("city", "福州市").put("district", "长乐市").getHome());
        check_region_id.put("350403", new YtJSONObject().put("new_region_id", "350404").put("province", "福建省").put("city", "三明市").put("district", "三元区").getHome());
        check_region_id.put("350427", new YtJSONObject().put("new_region_id", "350405").put("province", "福建省").put("city", "三明市").put("district", "沙县区").getHome());
        check_region_id.put("350625", new YtJSONObject().put("new_region_id", "350605").put("province", "福建省").put("city", "漳州市").put("district", "长泰区").getHome());
        check_region_id.put("350681", new YtJSONObject().put("new_region_id", "350604").put("province", "福建省").put("city", "漳州市").put("district", "龙海区").getHome());
        check_region_id.put("360105", new YtJSONObject().put("new_region_id", "360112").put("province", "江西省").put("city", "南昌市").put("district", "新建区").getHome());
        check_region_id.put("360421", new YtJSONObject().put("new_region_id", "360404").put("province", "江西省").put("city", "九江市").put("district", "柴桑区").getHome());
        check_region_id.put("360427", new YtJSONObject().put("new_region_id", "360603").put("province", "江西省").put("city", "鹰潭市").put("district", "余江区").getHome());
        check_region_id.put("360622", new YtJSONObject().put("new_region_id", "360603").put("province", "江西省").put("city", "鹰潭市").put("district", "余江区").getHome());
        check_region_id.put("360721", new YtJSONObject().put("new_region_id", "360704").put("province", "江西省").put("city", "赣州市").put("district", "赣县区").getHome());
        check_region_id.put("360727", new YtJSONObject().put("new_region_id", "360783").put("province", "江西省").put("city", "赣州市").put("district", "龙南县").getHome());
        check_region_id.put("361029", new YtJSONObject().put("new_region_id", "361003").put("province", "江西省").put("city", "抚州市").put("district", "东乡区").getHome());
        check_region_id.put("361121", new YtJSONObject().put("new_region_id", "361104").put("province", "江西省").put("city", "上饶市").put("district", "广信区").getHome());
        check_region_id.put("370125", new YtJSONObject().put("new_region_id", "370115").put("province", "山东省").put("city", "济南市").put("district", "济阳区").getHome());
        check_region_id.put("370127", new YtJSONObject().put("new_region_id", "370116").put("province", "山东省").put("city", "济南市").put("district", "莱芜区").getHome());
        check_region_id.put("370181", new YtJSONObject().put("new_region_id", "370114").put("province", "山东省").put("city", "济南市").put("district", "章丘市").getHome());
        check_region_id.put("370282", new YtJSONObject().put("new_region_id", "370215").put("province", "山东省").put("city", "青岛市").put("district", "即墨区").getHome());
        check_region_id.put("370521", new YtJSONObject().put("new_region_id", "370505").put("province", "山东省").put("city", "东营市").put("district", "垦利区").getHome());
        check_region_id.put("370634", new YtJSONObject().put("new_region_id", "370614").put("province", "山东省").put("city", "烟台市").put("district", "蓬莱区").getHome());
        check_region_id.put("370684", new YtJSONObject().put("new_region_id", "370614").put("province", "山东省").put("city", "烟台市").put("district", "蓬莱区").getHome());
        check_region_id.put("371200", new YtJSONObject().put("new_region_id", "370100").put("province", "山东省").put("city", "济南市").put("district", "").getHome());
        check_region_id.put("371202", new YtJSONObject().put("new_region_id", "370116").put("province", "山东省").put("city", "济南市").put("district", "莱芜区").getHome());
        check_region_id.put("371203", new YtJSONObject().put("new_region_id", "370117").put("province", "山东省").put("city", "济南市").put("district", "钢城区").getHome());
        check_region_id.put("371523", new YtJSONObject().put("new_region_id", "371503").put("province", "山东省").put("city", "聊城市").put("district", "茌平区").getHome());
        check_region_id.put("371626", new YtJSONObject().put("new_region_id", "371681").put("province", "山东省").put("city", "滨州市").put("district", "邹平市").getHome());
        check_region_id.put("371727", new YtJSONObject().put("new_region_id", "371703").put("province", "山东省").put("city", "菏泽市").put("district", "定陶区").getHome());
        check_region_id.put("410322", new YtJSONObject().put("new_region_id", "410308").put("province", "河南省").put("city", "洛阳市").put("district", "孟津区").getHome());
        check_region_id.put("410381", new YtJSONObject().put("new_region_id", "410307").put("province", "河南省").put("city", "洛阳市").put("district", "偃师区").getHome());
        check_region_id.put("410728", new YtJSONObject().put("new_region_id", "410783").put("province", "河南省").put("city", "新乡市").put("district", "长垣市").getHome());
        check_region_id.put("411023", new YtJSONObject().put("new_region_id", "411003").put("province", "河南省").put("city", "许昌市").put("district", "许昌县").getHome());
        check_region_id.put("411626", new YtJSONObject().put("new_region_id", "411603").put("province", "河南省").put("city", "周口市").put("district", "淮阳区").getHome());
        check_region_id.put("420821", new YtJSONObject().put("new_region_id", "420882").put("province", "湖北省").put("city", "荆门市").put("district", "京山市").getHome());
        check_region_id.put("421023", new YtJSONObject().put("new_region_id", "421088").put("province", "湖北省").put("city", "荆州市").put("district", "监利市").getHome());
        check_region_id.put("430124", new YtJSONObject().put("new_region_id", "430182").put("province", "湖南省").put("city", "长沙市").put("district", "宁乡市").getHome());
        check_region_id.put("430221", new YtJSONObject().put("new_region_id", "430212").put("province", "湖南省").put("city", "株洲市").put("district", "渌口区").getHome());
        check_region_id.put("430521", new YtJSONObject().put("new_region_id", "430582").put("province", "湖南省").put("city", "邵阳市").put("district", "邵东市").getHome());
        check_region_id.put("431121", new YtJSONObject().put("new_region_id", "431181").put("province", "湖南省").put("city", "永州市").put("district", "祁阳市").getHome());
        check_region_id.put("441902", new YtJSONObject().put("new_region_id", "441931").put("province", "广东省").put("city", "东莞市").put("district", "南城街道").getHome());
        check_region_id.put("441904", new YtJSONObject().put("new_region_id", "441935").put("province", "广东省").put("city", "东莞市").put("district", "东城街道").getHome());
        check_region_id.put("441906", new YtJSONObject().put("new_region_id", "441917").put("province", "广东省").put("city", "东莞市").put("district", "万江街道").getHome());
        check_region_id.put("441911", new YtJSONObject().put("new_region_id", "441936").put("province", "广东省").put("city", "东莞市").put("district", "莞城街道").getHome());
        check_region_id.put("450127", new YtJSONObject().put("new_region_id", "450181").put("province", "广西壮族自治区").put("city", "南宁市").put("district", "横州市").getHome());
        check_region_id.put("450331", new YtJSONObject().put("new_region_id", "450381").put("province", "广西壮族自治区").put("city", "桂林市").put("district", "荔浦市").getHome());
        check_region_id.put("451021", new YtJSONObject().put("new_region_id", "451003").put("province", "广西壮族自治区").put("city", "百色市").put("district", "田阳区").getHome());
        check_region_id.put("451023", new YtJSONObject().put("new_region_id", "451082").put("province", "广西壮族自治区").put("city", "百色市").put("district", "平果市").getHome());
        check_region_id.put("451281", new YtJSONObject().put("new_region_id", "451203").put("province", "广西壮族自治区").put("city", "河池市").put("district", "宜州市").getHome());
        check_region_id.put("500200", new YtJSONObject().put("new_region_id", "500100").put("province", "重庆市").put("city", "重庆市").put("district", "").getHome());
        check_region_id.put("500228", new YtJSONObject().put("new_region_id", "500155").put("province", "重庆市").put("city", "重庆市").put("district", "梁平县").getHome());
        check_region_id.put("500232", new YtJSONObject().put("new_region_id", "500156").put("province", "重庆市").put("city", "重庆市").put("district", "武隆区").getHome());
        check_region_id.put("500234", new YtJSONObject().put("new_region_id", "500154").put("province", "重庆市").put("city", "重庆市").put("district", "开州区").getHome());
        check_region_id.put("510124", new YtJSONObject().put("new_region_id", "510117").put("province", "四川省").put("city", "成都市").put("district", "郫县").getHome());
        check_region_id.put("510132", new YtJSONObject().put("new_region_id", "510118").put("province", "四川省").put("city", "成都市").put("district", "新津区").getHome());
        check_region_id.put("510180", new YtJSONObject().put("new_region_id", "510185").put("province", "四川省").put("city", "成都市").put("district", "简阳市").getHome());
        check_region_id.put("510626", new YtJSONObject().put("new_region_id", "510604").put("province", "四川省").put("city", "德阳市").put("district", "罗江区").getHome());
        check_region_id.put("510724", new YtJSONObject().put("new_region_id", "510705").put("province", "四川省").put("city", "绵阳市").put("district", "安州区").getHome());
        check_region_id.put("510922", new YtJSONObject().put("new_region_id", "510981").put("province", "四川省").put("city", "遂宁市").put("district", "射洪市").getHome());
        check_region_id.put("511028", new YtJSONObject().put("new_region_id", "511083").put("province", "四川省").put("city", "内江市").put("district", "隆昌县").getHome());
        check_region_id.put("511521", new YtJSONObject().put("new_region_id", "511504").put("province", "四川省").put("city", "宜宾市").put("district", "叙州区").getHome());
        check_region_id.put("513425", new YtJSONObject().put("new_region_id", "513402").put("province", "四川省").put("city", "凉山彝族自治州").put("district", "会理市").getHome());
        check_region_id.put("520221", new YtJSONObject().put("new_region_id", "520204").put("province", "贵州省").put("city", "六盘水市").put("district", "水城区").getHome());
        check_region_id.put("520222", new YtJSONObject().put("new_region_id", "520281").put("province", "贵州省").put("city", "六盘水市").put("district", "盘州市").getHome());
        check_region_id.put("520321", new YtJSONObject().put("new_region_id", "520304").put("province", "贵州省").put("city", "遵义市").put("district", "播州区").getHome());
        check_region_id.put("520522", new YtJSONObject().put("new_region_id", "520581").put("province", "贵州省").put("city", "毕节市").put("district", "黔西市").getHome());
        check_region_id.put("522322", new YtJSONObject().put("new_region_id", "522302").put("province", "贵州省").put("city", "黔西南布依族苗族自治州").put("district", "兴仁市").getHome());
        check_region_id.put("530122", new YtJSONObject().put("new_region_id", "530115").put("province", "云南省").put("city", "昆明市").put("district", "晋宁区").getHome());
        check_region_id.put("530522", new YtJSONObject().put("new_region_id", "530581").put("province", "云南省").put("city", "保山市").put("district", "腾冲市").getHome());
        check_region_id.put("530321", new YtJSONObject().put("new_region_id", "530304").put("province", "云南省").put("city", "曲靖市").put("district", "马龙区").getHome());
        check_region_id.put("530328", new YtJSONObject().put("new_region_id", "530303").put("province", "云南省").put("city", "曲靖市").put("district", "沾益区").getHome());
        check_region_id.put("530422", new YtJSONObject().put("new_region_id", "530481").put("province", "云南省").put("city", "玉溪市").put("district", "澄江市").getHome());
        check_region_id.put("530630", new YtJSONObject().put("new_region_id", "530681").put("province", "云南省").put("city", "昭通市").put("district", "水富市").getHome());
        check_region_id.put("532331", new YtJSONObject().put("new_region_id", "532302").put("province", "云南省").put("city", "楚雄彝族自治州").put("district", "禄丰市").getHome());
        check_region_id.put("533321", new YtJSONObject().put("new_region_id", "533301").put("province", "云南省").put("city", "怒江傈僳族自治州").put("district", "泸水市").getHome());
        check_region_id.put("542200", new YtJSONObject().put("new_region_id", "540600").put("province", "西藏自治区").put("city", "山南市").put("district", "").getHome());
        check_region_id.put("542223", new YtJSONObject().put("new_region_id", "540522").put("province", "西藏自治区").put("city", "山南市").put("district", "贡嘎县").getHome());
        check_region_id.put("542400", new YtJSONObject().put("new_region_id", "540600").put("province", "西藏自治区").put("city", "那曲市").put("district", "").getHome());
        check_region_id.put("542421", new YtJSONObject().put("new_region_id", "540602").put("province", "西藏自治区").put("city", "那曲市").put("district", "那曲县").getHome());
        check_region_id.put("542425", new YtJSONObject().put("new_region_id", "540624").put("province", "西藏自治区").put("city", "那曲市").put("district", "安多县").getHome());
        check_region_id.put("542427", new YtJSONObject().put("new_region_id", "540626").put("province", "西藏自治区").put("city", "那曲市").put("district", "索县").getHome());
        check_region_id.put("610125", new YtJSONObject().put("new_region_id", "610118").put("province", "陕西省").put("city", "西安市").put("district", "鄠邑区").getHome());
        check_region_id.put("610322", new YtJSONObject().put("new_region_id", "610305").put("province", "陕西省").put("city", "宝鸡市").put("district", "凤翔区").getHome());
        check_region_id.put("610427", new YtJSONObject().put("new_region_id", "610482").put("province", "陕西省").put("city", "咸阳市").put("district", "彬州市").getHome());
        check_region_id.put("610623", new YtJSONObject().put("new_region_id", "610681").put("province", "陕西省").put("city", "延安市").put("district", "子长市").getHome());
        check_region_id.put("610721", new YtJSONObject().put("new_region_id", "610703").put("province", "陕西省").put("city", "汉中市").put("district", "南郑区").getHome());
        check_region_id.put("610821", new YtJSONObject().put("new_region_id", "610881").put("province", "陕西省").put("city", "榆林市").put("district", "神木市").getHome());
        check_region_id.put("610928", new YtJSONObject().put("new_region_id", "610981").put("province", "陕西省").put("city", "安康市").put("district", "旬阳市").getHome());
        check_region_id.put("620201", new YtJSONObject().put("new_region_id", "620200").put("province", "甘肃省").put("city", "嘉峪关市").put("district", "").getHome());
        check_region_id.put("620824", new YtJSONObject().put("new_region_id", "620881").put("province", "甘肃省").put("city", "平凉市").put("district", "华亭市").getHome());
        check_region_id.put("630122", new YtJSONObject().put("new_region_id", "630106").put("province", "青海省").put("city", "西宁市").put("district", "湟中区").getHome());
        check_region_id.put("632321", new YtJSONObject().put("new_region_id", "632301").put("province", "青海省").put("city", "黄南藏族自治州").put("district", "同仁市").getHome());
        check_region_id.put("632824", new YtJSONObject().put("new_region_id", "632857").put("province", "青海省").put("city", "海西蒙古族藏族自治州").put("district", "大柴旦行政委员会").getHome());
        check_region_id.put("632825", new YtJSONObject().put("new_region_id", "632801").put("province", "青海省").put("city", "海西蒙古族藏族自治州").put("district", "格尔木市").getHome());
        check_region_id.put("652200", new YtJSONObject().put("new_region_id", "650500").put("province", "新疆维吾尔自治区").put("city", "哈密市").put("district", "").getHome());
        check_region_id.put("652201", new YtJSONObject().put("new_region_id", "650502").put("province", "新疆维吾尔自治区").put("city", "哈密市").put("district", "伊州区").getHome());
        check_region_id.put("652923", new YtJSONObject().put("new_region_id", "652902").put("province", "新疆维吾尔自治区").put("city", "阿克苏地区").put("district", "库车市").getHome());
        check_region_id.put("654223", new YtJSONObject().put("new_region_id", "654203").put("province", "新疆维吾尔自治区").put("city", "塔城地区").put("district", "沙湾市").getHome());

        String sql = "";
        for (int i = 0; i < month.length; i++) {

            for (Map.Entry<String, JSONObject> s : check_region_id.entrySet()) {
                System.out.println("月份 : " + month[i]);
                sql = "update dbadmin.o2o_region_category_app_tui_" + month[i] + " set region_id = '" + s.getValue().getString("new_region_id") + "',province = '" + s.getValue().getString("province") + "',city = '" + s.getValue().getString("city") + "',district = '" + s.getValue().getString("district") + "' where region_id = '" + s.getKey() + "';";
                System.out.println("更新 sql :" + sql);
                update(sql);
                sql = "update dbadmin.o2o_showlive_app_" + month[i] + " set regional_id = '" + s.getValue().getString("new_region_id") + "',province = '" + s.getValue().getString("province") + "',city = '" + s.getValue().getString("city") + "',district = '" + s.getValue().getString("district") + "' where regional_id = '" + s.getKey() + "';";
                System.out.println("更新 sql :" + sql);
                update(sql);
                sql = "update dbadmin.o2o_tourism_idl_tui_" + month[i] + " set region_id_out = '" + s.getValue().getString("new_region_id") + "',province_out = '" + s.getValue().getString("province") + "',city_out = '" + s.getValue().getString("city") + "',district_out = '" + s.getValue().getString("district") + "' where region_id_out = '" + s.getKey() + "';";
                System.out.println("更新 sql :" + sql);
                update(sql);
                sql = "update dbadmin.o2o_allplat_shop_bdl_" + month[i] + " set region_id = '" + s.getValue().getString("new_region_id") + "' where region_id = '" + s.getKey() + "';";
                System.out.println("更新 sql :" + sql);
                update(sql);
                sql = "update dbadmin.o2o_anchor_app_" + month[i] + " set regional_id = '" + s.getValue().getString("new_region_id") + "',province = '" + s.getValue().getString("province") + "',city = '" + s.getValue().getString("city") + "',district = '" + s.getValue().getString("district") + "' where regional_id = '" + s.getKey() + "';";
                System.out.println("更新 sql :" + sql);
                update(sql);
                sql = "update dbadmin.o2o_bestsell_app_" + month[i] + " set region_id = '" + s.getValue().getString("new_region_id") + "',province = '" + s.getValue().getString("province") + "',city = '" + s.getValue().getString("city") + "',district = '" + s.getValue().getString("district") + "' where region_id = '" + s.getKey() + "';";
                System.out.println("更新 sql :" + sql);
                update(sql);
                sql = "update swb_schema.tourism_idl_quanwang_" + month[i] + " set region_id_out = '" + s.getValue().getString("new_region_id") + "',province_out = '" + s.getValue().getString("province") + "',city_out = '" + s.getValue().getString("city") + "',district_out = '" + s.getValue().getString("district") + "' where region_id_out = '" + s.getKey() + "';";
                System.out.println("更新 sql :" + sql);
                update(sql);
                sql = "update swb_schema.tourism_idl_quanwang_tui_" + month[i] + " set region_id_out = '" + s.getValue().getString("new_region_id") + "',province_out = '" + s.getValue().getString("province") + "',city_out = '" + s.getValue().getString("city") + "',district_out = '" + s.getValue().getString("district") + "' where region_id_out = '" + s.getKey() + "';";
                System.out.println("更新 sql :" + sql);
                update(sql);
                sql = "update swb_schema.tourism_bdl_quanwang_" + month[i] + " set region_id_out = '" + s.getValue().getString("new_region_id") + "',province_out = '" + s.getValue().getString("province") + "',city_out = '" + s.getValue().getString("city") + "',district_out = '" + s.getValue().getString("district") + "' where region_id_out = '" + s.getKey() + "';";
                System.out.println("更新 sql :" + sql);
                update(sql);
            }
        }

    }

    public static void select(String sql) throws SQLException {

        //获取连接
        Properties properties = new Properties();
        try {
            properties.load(ClassLoader.getSystemClassLoader().getResourceAsStream("gov/pgconnect.properties"));
            dataSource = DruidDataSourceFactory.createDataSource(properties);

        } catch (Exception e) {
            e.printStackTrace();
        }

        // 获取德鲁伊对象连接器
        if (connection == null) {
            try {
                connection = dataSource.getConnection();
                System.out.println("connection : -->" + connection);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
//        String executoresultSetQL = "select * from dim_data.dim_platform";

        preparedStatement = connection.prepareStatement(sql);
        ResultSet resultSet = preparedStatement.executeQuery();
        // 打印 resultSet 数据
        ResultSetMetaData resultSetmd = resultSet.getMetaData();
        int columnsNumber = resultSetmd.getColumnCount();
        while (resultSet.next()) {
            for (int i = 1; i <= columnsNumber; i++) {
                if (i > 1) System.out.print(",  ");
                String columnValue = resultSet.getString(i);
                System.out.print(columnValue + " " + resultSetmd.getColumnName(i));
            }
            System.out.println("");
        }
        preparedStatement.close();
    }

    public static void update(String sql) throws SQLException {

        //获取连接
        Properties properties = new Properties();
        try {
            properties.load(ClassLoader.getSystemClassLoader().getResourceAsStream("gov/pgconnect.properties"));
            dataSource = DruidDataSourceFactory.createDataSource(properties);

        } catch (Exception e) {
            e.printStackTrace();
        }

        // 获取德鲁伊对象连接器
        if (connection == null) {
            try {
                connection = dataSource.getConnection();
                System.out.println("connection : -->" + connection);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
//        String executoresultSetQL = "select * from dim_data.dim_platform";

        preparedStatement = connection.prepareStatement(sql);
        int resultSet = preparedStatement.executeUpdate();
        // 打印 resultSet 数据
        System.out.println("一共 : " + resultSet + " 条数据受影响 ! ");
        preparedStatement.close();

    }


}